<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
  var date = new Date('2020-10-10 07:18:01');
  console.log(date);
  console.log(date.getMonth());
</script>
</body>
</html>